/* 
 * Copyright 2012 Mikaël GUILLEMOT
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package test;

import java.applet.Applet;

import org.g2de.BasicGameFrame;
import org.g2de.gui.UIBasicOperations;

/**
 * Point d'entrée de l'application
 * 
 * @author Mikael GUILLEMOT
 * @version 1.0
 * 
 */
public class Start extends Applet {

	private static final long serialVersionUID = 1L;

	@Override
	public void init() {
		BasicGameFrame.runAsApplet(this);
		// on demare le moteur graphique
		BasicGameFrame e = BasicGameFrame.getInstance();
		//e.setFPSLimit(80);
		e.start();
	}

	@Override
	public void stop() {
		BasicGameFrame.getInstance().stop();
	}

	public static void main(String[] args) {
		// on demare le moteur graphique
		BasicGameFrame e = BasicGameFrame.getInstance();
		// e.setFPSLimit(80);
		e.setTitle("g2Dengine");
		e.start();
		e.addUI(new UIBasicOperations("g2Dengine"), BasicGameFrame.UI_TOP_LAYER);
	}
	
	private static void common() {
		//ici on cree une image de base et un masque pour le clipping
		//puis on eajoute l'effet et on affiche tout.
		
	}
}
